<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>购买流程-步骤一</title>
<link href="../c/base.css" rel="stylesheet" type="text/css">
<link href="../c/toefl.css" rel="stylesheet" type="text/css">
<script src="../j/jquery-2.1.0.js" type="text/javascript"
	charset="utf-8"></script>	
<script src="../layer/layer.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	function orderform() {
		var pay_name = $("#pay_name").val();
		var pay_tel = $("#pay_tel").val();
		if(pay_name == ''){
			layer.alert('姓名不能为空', function(index){
				layer.close(index);
			});
			return false;
		}else if(pay_tel == ''){
			layer.alert('电话号码不能为空', function(index){
				layer.close(index);
			});
			return false;
		}else{
			$("#orderform").submit();
			return true;
		}
		
	}
</script>
</head>

<body>
	<div class="doc1180">
		<div class="process">
			<div class="processTop">
				<ul>
					<li class="on">填写联系人并确认商品信息</li>
					<li><a href="###">填写并核对订单信息</a></li>
					<li><a href="###">购买完成</a></li>
				</ul>
			</div>
			<div class="processTitle">请务必确认联系人信息</div>

			<form action="toStepTwo" method="post" id="orderform">
				<div class="processForm">
					<input type="text" class="processInput" placeholder="姓名"
						name="pay_name" id="pay_name" th:value="${pay_name}"> <input type="text" class="processInput"
						placeholder="电话" id="pay_tel" name="pay_tel" th:value="${pay_tel}"> <input type="hidden"
						name="castle_id" th:value="${castle.castle_id}">
				</div>
			</form>

			<div class="processTable">
				<table border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>课程</td>
						<td>数量</td>
						<td>单价</td>
						<td>总价</td>
					</tr>
					<tr>
						<td class="processKc">
							<div class="processPic">
								<img th:src="${castle.img_url}">
							</div>
							<div class="processText">[[${castle.class_title}]]</div>
						</td>
						<td>1</td>
						<td>[[${castle.castle_pay}]]元</td>
						<td>[[${1 * castle.castle_pay}]]元</td>
					</tr>
					<tr>
						<td></td>
						<td colspan="3" class="processPay">
							<div>共 1 门课程 ，应付金额：[[${1 * castle.castle_pay}]]元</div>
							<div>
								使用<input type="text" class="processRPB">RPB，抵扣：-100.00
							</div>
							<div class="f_12">（可用RPB2000，本次最高可用1000）</div>
						</td>
					</tr>
				</table>
				<div class="processYf">
					应付金额：<span>[[${1 * castle.castle_pay}]]</span>元
				</div>
				<div class="processB">
					<a href="###" class="processButton" onclick="orderform()">提交订单</a>
				</div>
			</div>
		</div>
	</div>

</body>
</html>
